Repository navigation
fix(select): add the validation prefix to the ALL_PROJECTED_ATTRIBUTES refusal - #583
Open
LeeroyHannigan wants to merge 1 commit into
Open
LeeroyHannigan wants to merge 1 commit into
LeeroyHannigan wants to merge 1 commit into
Conversation
…S refusal Amazon DynamoDB answers Select=ALL_PROJECTED_ATTRIBUTES without an IndexName with `1 validation error detected: ALL_PROJECTED_ATTRIBUTES can be used only when Querying using an IndexName`, on Query (with a KeyConditionExpression, with legacy KeyConditions, with ConsistentRead true or false) and on Scan (measured 2026-10-25 at 21:13 and 21:53 UTC, each request twice). ExtendDB sent the sentence without the prefix on both. Query and Scan share the refusal in validate_select_projection, so the text changes there. handle_scan holds a second copy of the sentence after the index lookup, which the shared check always reaches first; it gets the same text so a later reorder of the Scan checks cannot bring the old one back.
LeeroyHannigan
requested review from
amrith,
c33howard,
jcshepherd,
pdf-amzn,
robinnsc and
yesyayen
as code owners
October 25, 2026 22:26
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #489 (row O3).
Select=ALL_PROJECTED_ATTRIBUTESwithout anIndexNamenow answers with the1 validation error detected:prefix DynamoDB uses, on Query and on Scan.What the service answers
Measured on 2026-10-25 at 21:13 and 21:53 UTC in us-east-1, each request sent twice with the same answer:
KeyConditionExpression, noConsistentRead1 validation error detected: ALL_PROJECTED_ATTRIBUTES can be used only when Querying using an IndexNameKeyConditionExpression,ConsistentReadfalseKeyConditionExpression,ConsistentReadtrueKeyConditionsMain sends the sentence without the prefix on all five.
The change
Query and Scan share the refusal in
validate_select_projection(crates/core/src/validation/mod.rs), so the text changes there.handle_scanholds a second copy of the sentence after the index lookup. The shared check always answers first for these requests, so that copy is not reached today; it gets the same text so a later reorder of the Scan checks cannot bring the old one back.Tests
tests/test_select_all_projected_attributes.py: 4 dual-target wire tests, one per measured Query form and one for Scan, asserting the full message.Run locally on 2026-10-25 against SQLite release builds:
tests/test_query_scan.py(116) andtests/test_wording_parity_validation.py(7) pass at the head and on main; they assert the sentence as a substring;tests/test_query_scan.py,tests/test_wording_parity_validation.pyand every test whose name containstest_scan, 158 passed;cargo +1.97.0 fmt --all -- --check,cargo +1.97.0 clippy -p extenddb-engine -p extenddb-core --all-targets -- -D warnings, andcargo test -p extenddb-engine -p extenddb-core(698 passed).CI runs the new file in
run-integration,run-integration-sqlite,mongodb-pytestandcassandra-pytest.Not changed here
Measured in the same runs, on main and unchanged by this PR:
ALL_PROJECTED_ATTRIBUTESon a table that does not exist: the service answers the sentence above, ExtendDB answers ResourceNotFoundException, because it resolves the table first.ALL_PROJECTED_ATTRIBUTESandAttributesToGet: the service answers1 validation error detected: Cannot specify the AttributesToGet when choosing to get ALL_PROJECTED_ATTRIBUTES; ExtendDB answers the IndexName sentence.FilterExpressionsyntax fault next toALL_PROJECTED_ATTRIBUTES: both report the filter first, with different wording (Syntax error; token: "=", near: "="on the service).ALL_PROJECTED_ATTRIBUTESand aProjectionExpression: the service prefixesCannot specify the ProjectionExpression when choosing to get ALL_PROJECTED_ATTRIBUTES; ExtendDB leaves it bare on Scan, and the code comment beside it says the service does.ALL_ATTRIBUTESandCOUNTwith aProjectionExpressionon Scan were not measured.Merging
git merge-tree --write-treeadds no conflict against any of the 13 open PRs that changecrates/core/src/validation/mod.rs, nor #562, which changes it through its base. #416, #395 and #200 conflict with main in the same files with or without this commit. #481 and #479 assert this sentence withendswith, so their tests pass after this lands; their comments saying ExtendDB omits the prefix become stale.